package com.cmc.cloud.cmclink.doc.vo.vesseloffhiremaintenancevo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 整船禁接的船舶维护 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class VesselOffHireMaintenanceBaseVO {

    @Schema(description = "船舶代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{VesselOffHireMaintenanceBaseVO.vesselCode.notBlank}")
    @Length(max = 20, message = "{VesselOffHireMaintenanceBaseVO.vesselCode.length}")
    private String vesselCode;

    @Schema(description = "开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{VesselOffHireMaintenanceBaseVO.beginDate.notNull}")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date beginDate;

    @Schema(description = "结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{VesselOffHireMaintenanceBaseVO.endDate.notNull}")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

    @Schema(description = "备注", example = "随便")
    @Length(max = 200, message = "{specialCargoBaseVO.remark.length}")
    private String remark;

    @Schema(description = "船舶英文名")
    private String vesselNameEn;

    @Schema(description = "船舶中文名")
    private String vesselNameCn;



}
